package com.lipuwater.agent.utils;


import com.google.gson.Gson;


public class MapToBeanUtil {

    public static Object toJavaBean(Object data, Class<?> clazz) {
        Object object = null;
        try {
            Gson gson = new Gson();
            String json = gson.toJson(data);
            object = gson.fromJson(json, clazz);
        } catch (Exception e) {
        }
        return object;
    }


}